package gotlib

func ButtonStringToBool(buttonString string) bool {
	if buttonString == "" || buttonString == "N" || buttonString == "n" {
		return false
	}
	return true
}

// GetFlowIdByFormName 根据formName获取最新版本流程Id
// func GetFlowIdByFormName(formName string) (flowId uint64) {
// 	flowId = 0
// 	sqlString := strings.Join([]string{"select flow_id from se_flow_mapping where deleted_at is NULL and form_name='", formName, "' order by flow_version desc limit 1"}, "")
// 	flowMapping, err := Query(context.Background(), sqlString)
// 	if err != nil {
// 		return
// 	}
// 	if len(flowMapping) != 1 {
// 		// err = fmt.Errorf("不能获取流程Id")

// 		return
// 	}
// 	flowId = gconv.Uint64(flowMapping[0]["flow_id"])
// 	return
// }
